package br.com.syspdv;

import javax.swing.JOptionPane;

import org.hibernate.Session;

public class Conexao {
	public static void main(String[] args) {
		Session sessao = null;
		try{
			sessao= HibernateUtil.getSession().openSession();
			JOptionPane.showMessageDialog(null, "Conectado!");
		}finally{
			sessao.close();
			JOptionPane.showMessageDialog(null, "Conexão Fechada!");
			
		}
	}

}
